#include <jni.h>
#include <string>
#include "gpio-test.h"

extern "C" {
    // 设置 GPIO 值
    JNIEXPORT void JNICALL
    Java_com_example_myapplication_MainActivity_setGpioValue(
            JNIEnv* env,
            jobject /* this */,
            jint gpioNum,
            jint value) {
        set_gpio(gpioNum, value);
    }

    // 读取 GPIO 值
    JNIEXPORT jint JNICALL
    Java_com_example_myapplication_MainActivity_getGpioValue(
            JNIEnv* env,
            jobject /* this */,
            jint gpioNum) {
        return get_gpio(gpioNum);
    }


}